<?php
/**
 * 市场推广2D试妆分享抽奖H5
 *
 * Author: lyun
 * Date: 2018/5/11
 * Created by Panxsoft.
 */

Route::group(['middleware' => 'WechatAuth'], function () {

    /**
     * 返回TencentAi美妆的编码
     *
     * @see \App\Http\Controllers\MayPromo\WechatImageController::create()
     */
    Route::get('create', 'WechatImageController@create');

    /**
     * 通过图片的media_id获取图片，并且保存到bos上,返回腾讯AI图片
     *
     * @see \App\Http\Controllers\MayPromo\WechatImageController::getPicUrlByMediaId()
     */
    Route::get('get-pic-url', 'WechatImageController@getPicUrlByMediaId');

    /**
     * 上传图片,返回腾讯AI图片 (测试用)
     *
     * @see \App\Http\Controllers\MayPromo\WechatImageController::getPicUrlByPostFile()
     */
    Route::post('get-base64', 'WechatImageController@getPicUrlByPostFile');

    /**
     * 测试公众号上传图片，获取微信的media_id
     *
     * @see \App\Http\Controllers\MayPromo\WechatImageController::uploadTempImage()
     */
    Route::post('get-media-id', 'WechatImageController@uploadTempImage');


    /**
     * 处理抽奖
     *
     * @see \App\Http\Controllers\MayPromo\PromoCouponController
     */
    Route::resource('promo-coupon', 'PromoCouponController');

});

